package models;

/**
 * class representing ranks and suits of cards,
 * methodes used to get rank or suits of cards
 */	
public class Card
{
private int rank, suit;
private static String[] suits = { "Hearts", "Spades", "Diamonds", "Clubs" };
private static String[] ranks  = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"};
    public static String rankAsString( int rank ) {
	        return ranks[rank] ;
	    }
	 
	    public Card(int suit, int rank)	//constructing a card with its rank and suit
	    {	        
	    	this.rank=rank;
	        this.suit=suit;
	    }
	 
	    public @Override String toString()	//print full desctiption of card ex. "5 of Clubs"
	    {
	          return ranks[rank] + " of " + suits[suit];
}
	 
	    public int getRank() {	//print rank of card ex. "5"
	         return rank;	    }
	 
	    public int getSuit() {	//print suit of card ex. "Clubs"
	        return suit;
   }
	}